//
// Created by tang on 23-4-24.
//

#include "method.hpp"
#include "class.hpp"

Method::Method (const Cursor &cursor, const Namespace &current_ns, Class *parent):
    TypeInfo (cursor, current_ns), parent_(parent), name_(cursor.spelling())
{

}
bool Method::should_compile () const
{
    return accessible();
}
bool Method::accessible () const
{
    return ((parent_->meta_.flag(Methods) ||
             parent_->meta_.flag(All)) &&
            !meta_.flag(Skipped)) ||
           (parent_->meta_.flag(WhiteListMethods) &&
            meta_.flag(Include));
}
